package com.kaifamiao.N0726;

public class Tree {
    // 健康值
    int health = 100;

    // 浇水， 每浇一次水 健康值 + 20
    public  void water(){
        this.health = health + 20;

    }

    // zhang 虫， 健康值 - 40
    public  void parasite(){
        this.health = health -40;
    }

    // 喷一次杀虫剂， 健康值 + 30
    public  void insecticide(){
        this.health = health + 30;

    }

}
